Skip to content

Conversation

@jhuber6
Copy link
Contributor

@jhuber6 jhuber6 commented Feb 10, 2025

Summary:
The name src is confusing when combined with the plugins and the newly
added liboffload.

@llvmbot
Copy link
Member

llvmbot commented Feb 10, 2025

@llvm/pr-subscribers-offload

Author: Joseph Huber (jhuber6)

Changes

Summary:
The name src is confusing when combined with the plugins and the newly
added liboffload.


Full diff: https://github.com/llvm/llvm-project/pull/126573.diff

16 Files Affected:

  • (modified) offload/CMakeLists.txt (+1-1)
  • (renamed) offload/libomptarget/CMakeLists.txt ()
  • (renamed) offload/libomptarget/DeviceImage.cpp ()
  • (renamed) offload/libomptarget/KernelLanguage/API.cpp ()
  • (renamed) offload/libomptarget/LegacyAPI.cpp ()
  • (renamed) offload/libomptarget/OffloadRTL.cpp ()
  • (renamed) offload/libomptarget/OpenMP/API.cpp ()
  • (renamed) offload/libomptarget/OpenMP/InteropAPI.cpp ()
  • (renamed) offload/libomptarget/OpenMP/Mapping.cpp ()
  • (renamed) offload/libomptarget/OpenMP/OMPT/Callback.cpp ()
  • (renamed) offload/libomptarget/PluginManager.cpp ()
  • (renamed) offload/libomptarget/device.cpp ()
  • (renamed) offload/libomptarget/exports ()
  • (renamed) offload/libomptarget/interface.cpp ()
  • (renamed) offload/libomptarget/omptarget.cpp ()
  • (renamed) offload/libomptarget/private.h ()
diff --git a/offload/CMakeLists.txt b/offload/CMakeLists.txt
index f6e894d39968590..25c879710645c7a 100644
--- a/offload/CMakeLists.txt
+++ b/offload/CMakeLists.txt
@@ -377,7 +377,7 @@ add_subdirectory(DeviceRTL)
 add_subdirectory(tools)
 
 # Build target agnostic offloading library.
-add_subdirectory(src)
+add_subdirectory(libomptarget)
 
 add_subdirectory(tools/offload-tblgen)
 add_subdirectory(liboffload)
diff --git a/offload/src/CMakeLists.txt b/offload/libomptarget/CMakeLists.txt
similarity index 100%
rename from offload/src/CMakeLists.txt
rename to offload/libomptarget/CMakeLists.txt
diff --git a/offload/src/DeviceImage.cpp b/offload/libomptarget/DeviceImage.cpp
similarity index 100%
rename from offload/src/DeviceImage.cpp
rename to offload/libomptarget/DeviceImage.cpp
diff --git a/offload/src/KernelLanguage/API.cpp b/offload/libomptarget/KernelLanguage/API.cpp
similarity index 100%
rename from offload/src/KernelLanguage/API.cpp
rename to offload/libomptarget/KernelLanguage/API.cpp
diff --git a/offload/src/LegacyAPI.cpp b/offload/libomptarget/LegacyAPI.cpp
similarity index 100%
rename from offload/src/LegacyAPI.cpp
rename to offload/libomptarget/LegacyAPI.cpp
diff --git a/offload/src/OffloadRTL.cpp b/offload/libomptarget/OffloadRTL.cpp
similarity index 100%
rename from offload/src/OffloadRTL.cpp
rename to offload/libomptarget/OffloadRTL.cpp
diff --git a/offload/src/OpenMP/API.cpp b/offload/libomptarget/OpenMP/API.cpp
similarity index 100%
rename from offload/src/OpenMP/API.cpp
rename to offload/libomptarget/OpenMP/API.cpp
diff --git a/offload/src/OpenMP/InteropAPI.cpp b/offload/libomptarget/OpenMP/InteropAPI.cpp
similarity index 100%
rename from offload/src/OpenMP/InteropAPI.cpp
rename to offload/libomptarget/OpenMP/InteropAPI.cpp
diff --git a/offload/src/OpenMP/Mapping.cpp b/offload/libomptarget/OpenMP/Mapping.cpp
similarity index 100%
rename from offload/src/OpenMP/Mapping.cpp
rename to offload/libomptarget/OpenMP/Mapping.cpp
diff --git a/offload/src/OpenMP/OMPT/Callback.cpp b/offload/libomptarget/OpenMP/OMPT/Callback.cpp
similarity index 100%
rename from offload/src/OpenMP/OMPT/Callback.cpp
rename to offload/libomptarget/OpenMP/OMPT/Callback.cpp
diff --git a/offload/src/PluginManager.cpp b/offload/libomptarget/PluginManager.cpp
similarity index 100%
rename from offload/src/PluginManager.cpp
rename to offload/libomptarget/PluginManager.cpp
diff --git a/offload/src/device.cpp b/offload/libomptarget/device.cpp
similarity index 100%
rename from offload/src/device.cpp
rename to offload/libomptarget/device.cpp
diff --git a/offload/src/exports b/offload/libomptarget/exports
similarity index 100%
rename from offload/src/exports
rename to offload/libomptarget/exports
diff --git a/offload/src/interface.cpp b/offload/libomptarget/interface.cpp
similarity index 100%
rename from offload/src/interface.cpp
rename to offload/libomptarget/interface.cpp
diff --git a/offload/src/omptarget.cpp b/offload/libomptarget/omptarget.cpp
similarity index 100%
rename from offload/src/omptarget.cpp
rename to offload/libomptarget/omptarget.cpp
diff --git a/offload/src/private.h b/offload/libomptarget/private.h
similarity index 100%
rename from offload/src/private.h
rename to offload/libomptarget/private.h

@github-actions
Copy link

github-actions bot commented Feb 10, 2025

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff a32efd8edc6ec5f80ffa16b3d4e52e6407d5fe99 fba4b9df58ab65c53cc980e280fbd3ee98fbf23f --extensions h,cpp -- offload/libomptarget/DeviceImage.cpp offload/libomptarget/KernelLanguage/API.cpp offload/libomptarget/LegacyAPI.cpp offload/libomptarget/OffloadRTL.cpp offload/libomptarget/OpenMP/API.cpp offload/libomptarget/OpenMP/InteropAPI.cpp offload/libomptarget/OpenMP/Mapping.cpp offload/libomptarget/OpenMP/OMPT/Callback.cpp offload/libomptarget/PluginManager.cpp offload/libomptarget/device.cpp offload/libomptarget/interface.cpp offload/libomptarget/omptarget.cpp offload/libomptarget/private.h
View the diff from clang-format here.
diff --git a/offload/libomptarget/interface.cpp b/offload/libomptarget/interface.cpp
index ea354400f2..6243204284 100644
--- a/offload/libomptarget/interface.cpp
+++ b/offload/libomptarget/interface.cpp
@@ -294,7 +294,7 @@ static KernelArgsTy *upgradeKernelArgs(KernelArgsTy *KernelArgs,
 
   // FIXME: This is a WA to "calibrate" the bad work done in the front end.
   // Delete this ugly code after the front end emits proper values.
-  auto CorrectMultiDim = [](uint32_t (&Val)[3]) {
+  auto CorrectMultiDim = [](uint32_t(&Val)[3]) {
     if (Val[1] == 0)
       Val[1] = 1;
     if (Val[2] == 0)

Summary:
The name `src` is confusing when combined with the plugins and the newly
added `liboffload`.
Copy link
Contributor

@shiltian shiltian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The naming of those folders are literally all over the place...We have all small letters mixed with capitalized first letter...

¯_(ツ)_/¯

@jhuber6
Copy link
Contributor Author

jhuber6 commented Feb 10, 2025

The naming of those folders are literally all over the place...We have all small letters mixed with capitalized first letter...

¯_(ツ)_/¯

I'll move DeviceRTL later hopefully.

@jhuber6 jhuber6 merged commit a854c26 into llvm:main Feb 10, 2025
5 of 6 checks passed
Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
Summary:
The name `src` is confusing when combined with the plugins and the newly
added `liboffload`.
joaosaffran pushed a commit to joaosaffran/llvm-project that referenced this pull request Feb 14, 2025
Summary:
The name `src` is confusing when combined with the plugins and the newly
added `liboffload`.
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Feb 24, 2025
Summary:
The name `src` is confusing when combined with the plugins and the newly
added `liboffload`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants